import React, { Component } from "react";

const data = [
    { id: "01", content: "Hello, React!" },
    { id: "02", content: "Hello, JavaScript!" },
    { id: "03", content: "Hello, Vue!" },
];

export default class Detail extends Component {
    render() {
        const { id, title } = this.props.match.params;

        const content = data.find((d) => d.id === id).content;

        return (
            <ul>
                <li>ID: {id}</li>
                <li>TITLE: {title}</li>
                <li>CONTENT: {content}</li>
            </ul>
        );
    }
}
